#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
using PII = pair<LL, int>;
const int N = 1e5 + 10;

/*
we can translate this problem into another problem:
just like constructing an 2D-matrix while b[i] is the minimize number of row i in the matrix
                                          g[i] is the maximum number of column i in the matrix

so the solution is simple

*/

LL n, m;
LL b[N], g[N];
LL cnt[N];
LL sum = 0;
vector<PII> num;


int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    

    cin >> n >> m;
    for(int i = 1; i <= n; i ++){
        cin >> b[i];
        num.push_back({b[i], i});
    }
    for(int i = 1; i <= m; i ++) cin >> g[i];
    sort(num.begin(), num.end());

    for(int i = 1; i <= n; i ++){
        sum = sum + b[i] * m;
    }

    

    for(int i = 1; i <= m; i ++){
        
    
        if(num[num.size() - 1].first > g[i]){
            cout << -1 << '\n';
            exit(0);
        }

        
        int idx = num.size() - 1;   

        if(g[i] == num[idx].first) continue;

        while(idx >= 0 && cnt[num[idx].second] >= m - 1){
            idx --;
        }

        if(idx == -1){
            cout << -1 << '\n';
            exit(0);
        }

        cnt[num[idx].second] ++;
        sum += g[i] - num[idx].first;

    }

    cout << sum << '\n';



    return 0;
}